Termination of the given ITRSProblem could successfully be proven:



ITRS
  ↳ ITRStoIDPProof

ITRS problem:
The following domains are used:

z

The TRS R consists of the following rules:

sumto(x, y) → Cond_sumto1(>@z(x, y), x, y)
Cond_sumto1(TRUE, x, y) → wrap(0@z)
Cond_sumto(TRUE, x, y) → if(sumto(+@z(x, 1@z), y), x, y)
if(wrap(z), x, y) → wrap(+@z(x, z))
sumto(x, y) → Cond_sumto(>=@z(y, x), x, y)

The set Q consists of the following terms:

sumto(x0, x1)
Cond_sumto1(TRUE, x0, x1)
Cond_sumto(TRUE, x0, x1)
if(wrap(x0), x1, x2)


Added dependency pairs

↳ ITRS
  ↳ ITRStoIDPProof
IDP
      ↳ IDependencyGraphProof

I DP problem:
The following domains are used:

z

The ITRS R consists of the following rules:

sumto(x, y) → Cond_sumto1(>@z(x, y), x, y)
Cond_sumto1(TRUE, x, y) → wrap(0@z)
Cond_sumto(TRUE, x, y) → if(sumto(+@z(x, 1@z), y), x, y)
if(wrap(z), x, y) → wrap(+@z(x, z))
sumto(x, y) → Cond_sumto(>=@z(y, x), x, y)

The integer pair graph contains the following rules and edges:

(0): COND_SUMTO(TRUE, x[0], y[0]) → SUMTO(+@z(x[0], 1@z), y[0])
(1): COND_SUMTO(TRUE, x[1], y[1]) → IF(sumto(+@z(x[1], 1@z), y[1]), x[1], y[1])
(2): SUMTO(x[2], y[2]) → COND_SUMTO(>=@z(y[2], x[2]), x[2], y[2])
(3): SUMTO(x[3], y[3]) → COND_SUMTO1(>@z(x[3], y[3]), x[3], y[3])

(0) -> (2), if ((y[0]* y[2])∧(+@z(x[0], 1@z) →* x[2]))


(0) -> (3), if ((y[0]* y[3])∧(+@z(x[0], 1@z) →* x[3]))


(2) -> (0), if ((x[2]* x[0])∧(y[2]* y[0])∧(>=@z(y[2], x[2]) →* TRUE))


(2) -> (1), if ((x[2]* x[1])∧(y[2]* y[1])∧(>=@z(y[2], x[2]) →* TRUE))



The set Q consists of the following terms:

sumto(x0, x1)
Cond_sumto1(TRUE, x0, x1)
Cond_sumto(TRUE, x0, x1)
if(wrap(x0), x1, x2)


The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 2 less nodes.

↳ ITRS
  ↳ ITRStoIDPProof
    ↳ IDP
      ↳ IDependencyGraphProof
IDP
          ↳ UsableRulesProof

I DP problem:
The following domains are used:

z

The ITRS R consists of the following rules:

sumto(x, y) → Cond_sumto1(>@z(x, y), x, y)
Cond_sumto1(TRUE, x, y) → wrap(0@z)
Cond_sumto(TRUE, x, y) → if(sumto(+@z(x, 1@z), y), x, y)
if(wrap(z), x, y) → wrap(+@z(x, z))
sumto(x, y) → Cond_sumto(>=@z(y, x), x, y)

The integer pair graph contains the following rules and edges:

(2): SUMTO(x[2], y[2]) → COND_SUMTO(>=@z(y[2], x[2]), x[2], y[2])
(0): COND_SUMTO(TRUE, x[0], y[0]) → SUMTO(+@z(x[0], 1@z), y[0])

(0) -> (2), if ((y[0]* y[2])∧(+@z(x[0], 1@z) →* x[2]))


(2) -> (0), if ((x[2]* x[0])∧(y[2]* y[0])∧(>=@z(y[2], x[2]) →* TRUE))



The set Q consists of the following terms:

sumto(x0, x1)
Cond_sumto1(TRUE, x0, x1)
Cond_sumto(TRUE, x0, x1)
if(wrap(x0), x1, x2)


As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

↳ ITRS
  ↳ ITRStoIDPProof
    ↳ IDP
      ↳ IDependencyGraphProof
        ↳ IDP
          ↳ UsableRulesProof
IDP
              ↳ IDPNonInfProof

I DP problem:
The following domains are used:

z

R is empty.
The integer pair graph contains the following rules and edges:

(2): SUMTO(x[2], y[2]) → COND_SUMTO(>=@z(y[2], x[2]), x[2], y[2])
(0): COND_SUMTO(TRUE, x[0], y[0]) → SUMTO(+@z(x[0], 1@z), y[0])

(0) -> (2), if ((y[0]* y[2])∧(+@z(x[0], 1@z) →* x[2]))


(2) -> (0), if ((x[2]* x[0])∧(y[2]* y[0])∧(>=@z(y[2], x[2]) →* TRUE))



The set Q consists of the following terms:

sumto(x0, x1)
Cond_sumto1(TRUE, x0, x1)
Cond_sumto(TRUE, x0, x1)
if(wrap(x0), x1, x2)


The constraints were generated the following way:
The DP Problem is simplified using the Induction Calculus [NONINF] with the following steps:
Note that final constraints are written in bold face.


For Pair SUMTO(x[2], y[2]) → COND_SUMTO(>=@z(y[2], x[2]), x[2], y[2]) the following chains were created:




For Pair COND_SUMTO(TRUE, x[0], y[0]) → SUMTO(+@z(x[0], 1@z), y[0]) the following chains were created:




To summarize, we get the following constraints P for the following pairs.



The constraints for P> respective Pbound are constructed from P where we just replace every occurence of "t ≥ s" in P by "t > s" respective "t ≥ c". Here c stands for the fresh constant used for Pbound.
Using the following integer polynomial ordering the resulting constraints can be solved
Polynomial interpretation over integers[POLO]:

POL(SUMTO(x1, x2)) = x2 + (-1)x1   
POL(>=@z(x1, x2)) = -1   
POL(TRUE) = -1   
POL(COND_SUMTO(x1, x2, x3)) = x3 + (-1)x2   
POL(+@z(x1, x2)) = x1 + x2   
POL(FALSE) = -1   
POL(1@z) = 1   
POL(undefined) = -1   

The following pairs are in P>:

COND_SUMTO(TRUE, x[0], y[0]) → SUMTO(+@z(x[0], 1@z), y[0])

The following pairs are in Pbound:

COND_SUMTO(TRUE, x[0], y[0]) → SUMTO(+@z(x[0], 1@z), y[0])

The following pairs are in P:

SUMTO(x[2], y[2]) → COND_SUMTO(>=@z(y[2], x[2]), x[2], y[2])

At least the following rules have been oriented under context sensitive arithmetic replacement:

+@z1


↳ ITRS
  ↳ ITRStoIDPProof
    ↳ IDP
      ↳ IDependencyGraphProof
        ↳ IDP
          ↳ UsableRulesProof
            ↳ IDP
              ↳ IDPNonInfProof
IDP
                  ↳ IDependencyGraphProof

I DP problem:
The following domains are used:

z

R is empty.
The integer pair graph contains the following rules and edges:

(2): SUMTO(x[2], y[2]) → COND_SUMTO(>=@z(y[2], x[2]), x[2], y[2])


The set Q consists of the following terms:

sumto(x0, x1)
Cond_sumto1(TRUE, x0, x1)
Cond_sumto(TRUE, x0, x1)
if(wrap(x0), x1, x2)


The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node.